<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<link rel="stylesheet" href="../../lib/layui/css/layui.css" media="all">
	</head>
	<body>
		<fieldset class="table-search-fieldset">
			<legend>搜索信息</legend>
			<div style="margin: 10px 10px 10px 10px">

				<div class="layui-form-item" style="margin-top: 20px;" onsubmit="false">
					<label class="layui-form-label">采购计划明细单号</label>
					<div class="layui-input-inline" style="width: 120px;">
						<input type="text" name="purchasingplandetail_id" id="purchasingplandetail_id"
							class="layui-input">
					</div>
					<label class="layui-form-label">采购计划单号</label>
					<div class="layui-input-inline" style="width: 120px;">
						<input type="text" name="purchasingplan_id" id="purchasingplan_id" class="layui-input">
					</div><label class="layui-form-label">商品编号</label>
					<div class="layui-input-inline" style="width: 120px;">
						<input type="text" name="product_id" id="product_id" class="layui-input">
					</div>
					<button class="layui-btn layui-btn-primary" id="search" data-type="reload">
						<i class="layui-icon"></i> 搜 索
					</button>
				</div>
			</div>
		</fieldset>
		<table class="layui-hide" id="test" lay-filter="test"></table>
		<script src="../../layui/layui.js"></script>
		<script src="../../js/User.js" type="text/javascript" charset="utf-8"></script>
		<script>
			layui.use('table', function() {
				var table = layui.table;
				var $ = layui.jquery;
				table.render({
					elem: '#test',
					page: 'true',
					url: globalData.server + 'Purage/getAllpurage',
					cols: [
						[{
							field: 'purchasestorage_id',
							title: '入库单号',
							width: 100,
						}, {
							field: 'supplier_id',
							title: '供应商',
							width: 100,
						}, {
							field: 'currency',
							title: '货币',
							width: 100,
						}, {
							field: 'invoice_number',
							title: '发票号',
							width: 100,
						}, {
							field: 'purchase_date',
							title: '采购日期',
							width: 100,
							templet:"<div>{{!d.purchase_date?'':layui.util.toDateString(d.purchase_date,'yyyy-MM-dd HH:mm:ss')}}</div>"
						}, {
							field: 'purchase_id',
							title: '采购人',
							width: 100,
						}, {
							field: 'purchaseorder_id',
							title: '采购订单号',
							width: 100,
						}, {
							field: 'operator_id',
							title: '操作员',
							width: 100,
						}, {
							field: 'create_date',
							title: '录入日期',
							width: 100,
							templet:"<div>{{!d.create_date?'':layui.util.toDateString(d.create_date,'yyyy-MM-dd HH:mm:ss')}}</div>"
						}, {
							field: 'inspector_id',
							title: '审核者',
							width: 100,
						}, {
							field: 'inspector_status',
							title: '审核状态',
							width: 100,
						}, {
							field: 'inspector_date',
							title: '审核日期',
							width: 100,
							templet:"<div>{{!d.inspector_date?'':layui.util.toDateString(d.inspector_date,'yyyy-MM-dd HH:mm:ss')}}</div>"
						}, {
							field: 'remarks',
							title: '备注',
							width: 100,
						}]
					]
				});


				//查询
				// $('#search').on('click', function() {
				// 	var purchasingplandetail_id = $("#purchasingplandetail_id").val();
				// 	var purchasingplan_id = $("#purchasingplan_id").val();
				// 	var product_id = $("#product_id").val();
				// 	table.reload('test', { 
				// 		where: { //接口需要的两个请求参数
				// 			'purchasingplandetail_id': purchasingplandetail_id,
				// 			'purchasingplan_id': purchasingplan_id,
				// 			'product_id': product_id,
				// 		}
				// 	});
				// });
			});
		</script>
	</body>
</html>
